<script setup>
import {reactive} from "vue";

const data = reactive({
  visible: false,
  dirId: "",
  parentDirId: "",
  dirName: "",
  createTime: "",
});

function openDirDetailDialog(detail) {
  data.visible = true;
  data.dirId = detail.dirId;
  data.parentDirId = detail.parentDirId;
  data.dirName = detail.name;
  data.createTime = detail.createTime;
}

defineExpose({
  openDirDetailDialog,
});
</script>

<template>
  <el-dialog v-model="data.visible" title="文件夹详情" width="600">
    <el-form label-position="right" label-width="140">
      <el-form-item label="文件夹ID：">
        <el-input v-model="data.dirId" readonly/>
      </el-form-item>
      <el-form-item label="父文件夹ID：">
        <el-input v-model="data.parentDirId" readonly/>
      </el-form-item>
      <el-form-item label="文件夹名称：">
        <el-input v-model="data.dirName" readonly/>
      </el-form-item>
      <el-form-item label="创建时间：">
        <el-input v-model="data.createTime" readonly/>
      </el-form-item>
    </el-form>
    <template #footer>
      <div class="dialog-footer">
        <el-button type="danger" @click="data.visible = false">关闭</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<style lang="scss" scoped>

</style>